package net.contrend.system.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import net.contrend.system.form.DeptForm;

public class DeptFormMapper implements RowMapper {

    @Override
    public Object mapRow(ResultSet rs, int index) throws SQLException {
        DeptForm dept = new DeptForm();
        dept.setDeptId(rs.getString("deptid"));
        dept.setDeptCode(rs.getString("deptcode"));
        dept.setDeptName(rs.getString("deptname"));
        dept.setDeptAbbr(rs.getString("deptabbr"));
        dept.setDeptChief(rs.getString("deptchief"));
        dept.setParentId(rs.getString("parentid"));
        dept.setStatus(rs.getString("status"));
        dept.setOrderNo(rs.getInt("orderno"));
        dept.setRemark(rs.getString("remark"));
        return dept;
    }

}
